package com.sunny.fetch.pojo;

import javax.persistence.*;

@Table(name = "f_adj_factor")
public class FAdjFactor {
    @Id
    private Long tid;

    /**
     * 股票代码
     */
    @Column(name = "ts_code")
    private String tsCode;

    /**
     * 交易日期
     */
    @Column(name = "trade_date")
    private String tradeDate;

    /**
     * 复权因子
     */
    @Column(name = "adj_factor")
    private Float adjFactor;

    public FAdjFactor(Long tid, String tsCode, String tradeDate, Float adjFactor) {
        this.tid = tid;
        this.tsCode = tsCode;
        this.tradeDate = tradeDate;
        this.adjFactor = adjFactor;
    }

    public FAdjFactor() {
        super();
    }

    /**
     * @return tid
     */
    public Long getTid() {
        return tid;
    }

    /**
     * @param tid
     */
    public void setTid(Long tid) {
        this.tid = tid;
    }

    /**
     * 获取股票代码
     *
     * @return ts_code - 股票代码
     */
    public String getTsCode() {
        return tsCode;
    }

    /**
     * 设置股票代码
     *
     * @param tsCode 股票代码
     */
    public void setTsCode(String tsCode) {
        this.tsCode = tsCode;
    }

    /**
     * 获取交易日期
     *
     * @return trade_date - 交易日期
     */
    public String getTradeDate() {
        return tradeDate;
    }

    /**
     * 设置交易日期
     *
     * @param tradeDate 交易日期
     */
    public void setTradeDate(String tradeDate) {
        this.tradeDate = tradeDate;
    }

    /**
     * 获取复权因子
     *
     * @return adj_factor - 复权因子
     */
    public Float getAdjFactor() {
        return adjFactor;
    }

    /**
     * 设置复权因子
     *
     * @param adjFactor 复权因子
     */
    public void setAdjFactor(Float adjFactor) {
        this.adjFactor = adjFactor;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", tid=").append(tid);
        sb.append(", tsCode=").append(tsCode);
        sb.append(", tradeDate=").append(tradeDate);
        sb.append(", adjFactor=").append(adjFactor);
        sb.append("]");
        return sb.toString();
    }
}